﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using FonShare.Classes.FTP;
using FonShare.Classes.Data;

namespace FonShare
{
    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            FS_FTPConnect.UploadFile(@"C:\Seb\01-IRON\09-Images\" + FileUpload1.FileName);
        }

        protected void Button2_Click(object sender, EventArgs e)
        {
            TestFTPFactory.Main();
        }

        protected void Button3_Click(object sender, EventArgs e)
        {
            MessageLabel.Text = FS_FXPTransfer.InitTransfer();
        }

        protected void Button4_Click(object sender, EventArgs e)
        {
            FS_Server server = new FS_Server();
            server.ServerName = "myserver";
            server.IP = "10.10.60.65";
            server.Login = "sebastien";
            server.Password = "twist";
            server.Path = "";
            if (FS_FTPManager.TestFTPServer(server))
            {
                MessageLabel.Text = "OK";
            }
            else
            {
                MessageLabel.Text = "Failed";
            }
        }
    }
}
